package com.xiaoy.core.base.dictionary.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.xiaoy.util.store.config.ConfigTable;

@Entity
@Table(name=ConfigTable.Dic.AREA_TABLENAME)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Area extends DicBaseEntity{

	
	private City city;
	
	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) 
	@JoinColumn(name="city_id")
	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}
	
	
	
}


